home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 248_01 / ddict.c < prev    next >
Text File  |  1989-08-16  |  1KB  |  47 lines

  1. /*
  2. **    name:        ddict.c
  3. **    purpose:    Display compressed dictionary
  4. **    status:        Copyright (c) 1988 - 1988
  5. **    author:        Roberto Artigas Jr - All rights reserved
  6. **    usage:        Non-commercial use, user supported software
  7. **    NOTES:        This program just uncompresses and displays
  8. **            the main dictionary. The next logical step
  9. **            is to modify it to take to command line
  10. **            parameters same as 'cdict'. I will leave
  11. **            that to the next enterprising indivitual that
  12. **            needs this particular function.
  13. */
  14. #define    maindef
  15.  
  16. #include    <stdio.h>
  17. #include    "dopt.h"
  18. #include    "dstruct.h"
  19. #include    "ddef.h"
  20.  
  21. int        mopen();
  22. void        mclose();
  23. char        *nxtmword();
  24.  
  25. int    main(argc,argv)
  26. int    argc;
  27. char    *argv[];
  28. {
  29.     char    *word;
  30.     long    count = 0;
  31.  
  32. fprintf(stderr,"DDICT Display Dictionary Utility for MicroSPELL v1.00\n");
  33.     fprintf(stderr,"[Dictionary display begin]\n");
  34.     if (!mopen()) return(1);
  35.     while ((word = nxtmword()) != hivalue) {
  36.         fprintf(stdout,"%s\n",word);
  37.         count++;
  38.         if (count % 100 == 0) {
  39.             fprintf(stderr,"[%ld words output]\n",count);
  40.         }
  41.     }
  42.     mclose();
  43.     fprintf(stderr,"[%ld words output]\n",count);
  44.     fprintf(stderr,"[Dictionary display ended]\n");
  45.     return(0);
  46. }
  47.